package cn.edu.ldu.util;

public class Consts {

    public static final String host = "http://127.0.0.1:";
    public static final int port = 7777;
    public static final int requestPort = 8080;
    public static final String path = "/ticktick/";
    public static final String urlBody = host + requestPort + path;

    /**
     * 通过id获取信息
     * get: PathVariable -- id
     * app/user/info/{id}
     */
    public static final String findUserById = urlBody + "app/user/info";
    /**
     * 保存用户信息
     * post: requestBody -- user实体
     * app/user/save
     */
    public static final String setUserInfo = urlBody + "app/user/save";

    public static final String updateUserInfo = urlBody + "app/user/update";
    public static final String editPassword = urlBody + "app/user/editpassword";

    public static final String getUserAccount = urlBody + "app/useraccount/info";

    public static final String getFriendsByIUserId = urlBody + "app/friends/list";
    public static final String getFriendByIUserId = urlBody + "app/friends/info";
    public static final String addFriend = urlBody + "app/friends/save";
    public static final String updateFriend = urlBody + "app/friends/update";
    public static final String getWithoutHandleMSG_FRIEND = urlBody + "app/friends/liststatus";
    public static final String deleteFriend = urlBody + "app/friends/delete";


    public static final String getChatHistoryByUserId = urlBody + "app/chathistory/list";
    public static final String addChatHistory = urlBody + "app/chathistory/save";
    public static final String getWithoutHandleMSG_CHAT = urlBody + "app/chathistory/liststatus";


    public static final String userLogin = urlBody + "app/user/login";

    public static final String getGroupChats = urlBody + "app/groupchat/list";
    public static final String getGroupChat = urlBody + "app/groupchat/info";
    public static final String addGroupChat = urlBody + "app/groupchat/save";


    public static final String getUserLastIp = urlBody + "sys/userip/list";
    public static final String addUserIpInfo = urlBody + "sys/userip/save";

    public static final String getMemberList = urlBody + "app/chatmember/memberlist";
    public static final String getMemberAccount = urlBody + "app/chatmember/memberaccount";




    /**
     *     消息类型：
     *     M_LOGIN：用户登录消息
     *     M_SUCCESS：登陆成功
     *     M_FAILURE：登陆失败
     *     M_ACK：服务器对登录用户的回应信息
     *     M_MSG：会话消息
     *     M_LOGOUT：用户退出消息
     */
    public static final String M_LOGIN = "M_LOGIN";
    public static final String M_SUCCESS = "M_SUCCESS";
    public static final String M_FAILURE = "M_FAILURE";
    public static final String M_NO_USER = "M_NO_USER";
    public static final String M_ACK = "M_ACK";
    public static final String M_MSG = "M_MSG";
    public static final String M_LOGOUT = "M_LOGOUT";
    public static final String M_FRIEND_LOGOUT = "M_FRIEND_LOGOUT";

    /**
     * 文本信息类型
     */
    public static final String CHAT_MSG = "CHAT_MSG";
    public static final String FRIEND_MARK = "CHAT_MSG";
    public static final String FRIEND_LIST = "FRIEND_LIST";
    public static final String CHAT_HISTORY = "CHAT_HISTORY";
    public static final String CHAT_HISTORY_STATUS = "CHAT_HISTORY_STATUS";

    /**
     * 协议  P : protocol
     */
    public static final String P_LOGIN_SUCCESS = "LoginSuccess";
    public static final String P_LOGIN_FAILURE = "LoginFailure";
    public static final String P_LOGOUT = "Logout";
    public static final String P_FRIEND_ONALINE = "FriendOnline";
    public static final String P_ADD_FRIEND = "AddFriend";
    public static final String P_CHAT_MEMBER = "ChatMember";
    public static final String P_CHAT_WITH_FRIEND = "ChatWithFriend";
    public static final String P_FRIEND_RESULT = "FriendResult";
    public static final String P_GROUP_RESULT = "GroupResult";
    public static final String P_EDIT_PASSWORD = "EditPassword";
    public static final String NP_REGISTER_SUCCESS = "RegisterSuccess";
    public static final String NP_REGISTER_FAILURE = "RegisterFailure";


    /**
     *    K : key(map)
     */
    public static final String K_USER_INFO = "userInfo";
    public static final String K_ACCOUNT_INFO = "accountInfo";
    public static final String K_GROUP_CHAT = "groupChat";
    public static final String K_ONLINE_FRIEND = "onlineFriends";
    public static final String K_OFFLINE_FRIEND = "offlineFriends";
    public static final String K_TODO_CHAT_FRIEND = "todoChatMsg";
    public static final String K_TODO_FRIEND_FRIEND = "todoFriendMsg";
    public static final String K_TOKEN = "token";

}
